package com.seocoo.worker.order.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.seocoo.worker.R;
import com.seocoo.worker.order.entity.RspOrderIWorkmateInfo;

/**
 * author : Ssp
 * e-mail : 981297079@qq.com
 * date   : 2020/2/2320:32
 * desc   :
 * version: 1.0
 */
public class OrderRelevanceWorkmateAdapter extends BaseQuickAdapter<RspOrderIWorkmateInfo, BaseViewHolder> {

    public OrderRelevanceWorkmateAdapter() {
        super(R.layout.order_relevance_workmate_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, RspOrderIWorkmateInfo item) {
        helper.setText(R.id.tv_user_name_mobile, item.getPhoneNumber() + "(" + item.getRealName() + ")");
        String amount = item.getAmount();
        if (!TextUtils.isEmpty(amount)) {
            helper.setText(R.id.et_money, amount);
        }
        helper.addOnClickListener(R.id.iv_reduce);
    }
}
